require(['/js/config.js'],() =>{
	require(['template','header','footer'],(template)=>{
		class Commodity{
			constructor () {
			    this.getList()
			}
			getList () {
				const id = location.search.slice(4)
				$.get(`http://www.xiongmaoyouxuan.com/api/tab/${id}`,resp => {
					console.log(resp)
					if (resp.code === 200) {
						const { list } = resp.data.items
						const { cname } = resp.data.category
						const { categories } = resp.data
						$('#goodsClassify').html(
							template('classifyTempalte',{
								cname,
								list,
								categories
							})
						)
					}
				})
			}
		}
		new Commodity()
	})
})